package com.jrx.mservices.feign.model;

import java.io.Serializable;
import java.net.URI;

/**
 * 服务信息对象
 *
 * @author
 * @create 2018-07-31 15:45
 **/

public class ServiceInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    private String serviceId;

    private String host;

    private int port;

    private boolean secure;

    private URI uri;


    public ServiceInfo() {
    }

    public ServiceInfo(String serviceId, String host, int port, boolean secure, URI uri) {
        this.serviceId = serviceId;
        this.host = host;
        this.port = port;
        this.secure = secure;
        this.uri = uri;
    }

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public boolean isSecure() {
        return secure;
    }

    public void setSecure(boolean secure) {
        this.secure = secure;
    }

    public URI getUri() {
        return uri;
    }

    public void setUri(URI uri) {
        this.uri = uri;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("ServiceInfo{");
        sb.append("serviceId='").append(serviceId).append('\'');
        sb.append(", host='").append(host).append('\'');
        sb.append(", port=").append(port);
        sb.append(", secure=").append(secure);
        sb.append(", uri=").append(uri);
        sb.append('}');
        return sb.toString();
    }
}
